package server.toolkit;

import java.io.File;
import java.io.IOException;

public class SystemUtil {
	private static File lff = null;

	public static File getLargestDisk() {
		if (lff != null)
			return lff;
		File[] files = File.listRoots();
		long lfp = 0l;
		for (int i = 0; i < files.length; i++) {
			File file = files[i];
			if (file.getFreeSpace() > lfp) {
				lfp = file.getFreeSpace();
				lff = file;
			}
		}
		return lff;
	}
	
	public static void main(String[] args) throws IOException{
		System.out.println(SystemUtil.getLargestDisk()
				.getCanonicalPath() + File.separator + "sliande");
	}
}
